import { createApp } from 'vue'
import App from './App.vue'
import router from "./router/index.js"
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createPinia } from 'pinia'
import piniaPluginPersist from 'pinia-plugin-persist'

// 导入全部对象
import gData from './comm/gData';
// 1.引入对象
import http from "./plugins/api";
// 创建一个新的app对象
let app = createApp(App);
// 挂载全局样式
app.use(createPinia().use(piniaPluginPersist)).use(ElementPlus);
// 挂载
app.config.globalProperties.$gData = gData;
app.config.globalProperties.$http = http;
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
// 渲染实例化对象
app.use(router).mount('#app');
